package com.promfy.ui.scrollviewgroup;

import android.app.Activity;
import android.graphics.Color;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.widget.ImageView;
import android.widget.TextView;

public class ScrollDemosActivity extends Activity {

	@SuppressWarnings("unused")
	private static final String TAG = "scroller";

	private MyViewGroup viewGroup;

//	private int[] drawableResources = new int[] { R.drawable.a1, R.drawable.a2,
//			R.drawable.a3, R.drawable.a4, R.drawable.a5, R.drawable.a6 };

	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		viewGroup = new MyViewGroup(this);
		setContentView(viewGroup);

//		for (int drawableId : drawableResources) {
//			ImageView imageView = new ImageView(this);
//			imageView.setImageDrawable(getResources().getDrawable(drawableId));
//			
//			viewGroup.addView(imageView);
//		}
		
		TextView tv = new TextView(this);
		tv.setBackgroundColor(Color.RED);
		viewGroup.addView(tv, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
		
		TextView tv1 = new TextView(this);
		tv1.setBackgroundColor(Color.YELLOW);
		viewGroup.addView(tv1, new LayoutParams(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT));
	}
}